import { defineStore } from "pinia";
import { ref } from "vue";

export const useUserIdStore = defineStore('user', () => {
      const count = ref(0);
      const user = ref('');
      // 修改为普通函数
      const increment = () => {
        count.value++;
      }; 
      const getUser = (n) => {
        user.value= n;
      };
      return { count,user, increment, getUser };
});
